package com.leonzx.base.entity.system;

import com.leonzx.base.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * @Author:张勇
 * @Description:
 * @Date: 2018-06-08 16:00
 */
@Table(name = "base_menu")
public class Menu extends BaseEntity {
    @Column(name = "name")
    private String name;
    @Column(name = "url")
    private String url;
    @Column (name = "parent_id")
    private String parentId;
    @Column(name = "sort_no")
    private Integer sortNo;
    @Column(name = "state")
    private Integer state;
    @Column(name = "type")
    private Integer type;
    @Column(name = "icon")
    private String icon;

    @Transient
    private String parentName;
    @Transient
    private List<Menu> sonMenus;

    public List<Menu> getSonMenus() {
        return sonMenus;
    }

    public void setSonMenus(List<Menu> sonMenus) {
        this.sonMenus = sonMenus;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public Integer getSortNo() {
        return sortNo;
    }

    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }
}
